﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WoChu.RfClient.Duty
{
    public partial class FrmBindCommand : Form
    {
        public static string BatchNo;
        public static DateTime BestTime;
        public static bool IsOK;
        public FrmBindCommand()
        {
            InitializeComponent();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(txtBatchNo.Text))
            {
                MessageBox.Show("请输入批次和配送日期");
                return;
            }
             BatchNo = txtBatchNo.Text;
             BestTime = dtpBestTime.Value;
            IsOK = true;
            FrmProdOnShelvesOrder frm = new FrmProdOnShelvesOrder();
            frm.Show();
            this.Close();
        }

        private void txtBatchNo_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode != Keys.Enter || string.IsNullOrEmpty(txtBatchNo.Text)) return;
                dtpBestTime.Focus();
        }  
    }
}